﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RDPServer.Tool
{
    public partial class frmCaseMgr : Form
    {
        static string m_CaseFile = AppDomain.CurrentDomain.BaseDirectory+"dsDB.xml";
        public frmCaseMgr()
        {
            InitializeComponent();

            if (System.IO.File.Exists(m_CaseFile))
            {
                this.dsDB.ReadXml(m_CaseFile);
                this.dsDB.AcceptChanges();
            }
        }

        private void SavetoolStripButton1_Click(object sender, EventArgs e)
        {
            this.dataGridView1.EndEdit();
            this.dsDB.AcceptChanges();
            this.dsDB.WriteXml(m_CaseFile);            
        }

        private void CanceltoolStripButton2_Click(object sender, EventArgs e)
        {
            this.dsDB.RejectChanges();
        }
    }
}
